<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="html" indent="yes"/>

<xsl:param name="title"  />
<xsl:template match="result">
<script type='text/javascript' src='js/item.js'></script>

<link rel="stylesheet" type="text/css" href="css/item.css"></link>
  

  <input type="button" value="Donate" id="donateButton"/> <br />

  
  <table>
		
		<tbody>
		
		<!-- Display thumbnail -->
		<xsl:variable name="imgUrl"><xsl:value-of select="item/thumbnail/url" /></xsl:variable>
		<xsl:if test="$imgUrl != ''">
	    	<img src="{$imgUrl}" ></img>
	    </xsl:if>
	    
	    <xsl:if test="$imgUrl=''" >
	    	<img src="img/cry-face-main.jpg" ></img>
	    </xsl:if>
	    <br />
	    
   		<h2>Title</h2> <br />
		<xsl:for-each select="item/title"><xsl:value-of select="." /><br /></xsl:for-each>
	    
		<h2>Type</h2> <br />
		<xsl:for-each select="item/names/item">
			<xsl:variable name="itemType"><xsl:value-of select="." /></xsl:variable>
			<a href="similarObj.jsp?type={$itemType}"><xsl:value-of select="." /></a> <br />
		</xsl:for-each>
		<h2>Subjects</h2> <br />
		<xsl:for-each select="item/subjects/item">
			<xsl:variable name="subject"><xsl:value-of select="." /></xsl:variable>
			<a href="relatedSubject.jsp?subject={$subject}">
			<xsl:value-of select="." /></a><br />
		</xsl:for-each>
		

		
		<h2>Categories</h2> <br />
		<xsl:for-each select="item/categories/item"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>Tags</h2> <br />
		<xsl:for-each select="item/tags/*"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>num_provenance</h2> <br />
		<xsl:for-each select="item/num_provenance"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>Provenance</h2> <br />
		<ul>
		<xsl:for-each select="item/provenance/*"><li><xsl:value-of select="." /></li></xsl:for-each>
		</ul>
		
		<h2>Production_notes</h2> <br />
		<xsl:for-each select="item/production_notes"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>production_date_earliest</h2> <br />
		<xsl:for-each select="item/production_date_earliest"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>production_date_latest</h2> <br />
		<xsl:for-each select="item/production_date_latest"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>id</h2> <br />
		<xsl:for-each select="item/id"><xsl:value-of select="." /><br /></xsl:for-each>
	
		<h2>permanent_url</h2> <br />
		<xsl:for-each select="item/permanent_url"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>item_uri</h2> <br />
		<xsl:for-each select="item/item_uri"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>multimedia_uri</h2> <br />
		<xsl:for-each select="item/multimedia_uri"><xsl:value-of select="." /><br /></xsl:for-each>
	
		<h2>dimensions</h2> <br />
		<xsl:for-each select="item/dimensions/*"><xsl:variable name="dimension" select="." />
			<xsl:if test="$dimension!='None'">
				<xsl:value-of select="name()" />:<xsl:value-of select="." /><br />
			</xsl:if>	
		</xsl:for-each>
		
		<h2>display_location</h2> <br />
		<xsl:for-each select="item/display_location"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>marks</h2> <br />
		<xsl:for-each select="item/marks"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>thumbnail</h2> <br />
		<xsl:for-each select="item/thumbnail/*"><xsl:variable name="thumbnail" select="." />
			<xsl:if test="$thumbnail!='None'">
				<xsl:value-of select="name()" />:<xsl:value-of select="." /><br />
			</xsl:if>	
		</xsl:for-each>	
	
		<h2>history_notes</h2> <br />
		<xsl:for-each select="item/history_notes"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>terms</h2> <br />
		<xsl:for-each select="item/terms/item">
		<xsl:value-of select="name()" /><br />
			<xsl:for-each select="./*">
				<xsl:value-of select="name()" />:<xsl:value-of select="." /><br />
			</xsl:for-each>
		</xsl:for-each>	
	
		<h2>description</h2> <br />
		<xsl:for-each select="item/description"><xsl:value-of select="." /><br /></xsl:for-each>
	
		<h2>importance</h2> <br />
		<xsl:for-each select="item/importance"><xsl:value-of select="." /><br /></xsl:for-each>
	
		<h2>acquisition_credit_line</h2> <br />
		<xsl:for-each select="item/acquisition_credit_line"><xsl:value-of select="." /><br /></xsl:for-each>
	
		<h2>administrative_history</h2> <br />
		<xsl:for-each select="item/administrative_history"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>summary</h2> <br />
		<xsl:for-each select="item/summary"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>significance_statement</h2> <br />
		<xsl:for-each select="item/significance_statement"><xsl:value-of select="." /><br /></xsl:for-each>
		
		<h2>registration_number</h2> <br />
		<xsl:for-each select="item/registration_number"><xsl:value-of select="." /><br /></xsl:for-each>
		
		
		<xsl:apply-templates/>
		 
		
		</tbody>
	
	</table>
    
  
</xsl:template>

<xsl:template match="item/*">
	<xsl:variable name="nodeValue"><xsl:value-of select="." /></xsl:variable>
	<xsl:if test="$nodeValue!='None'">
	 <p><h3><xsl:value-of select="name()"/>:</h3> <xsl:apply-templates /> </p> 
 	</xsl:if>

</xsl:template>


<xsl:template match="item/*/*">
	 <xsl:variable name="nodeValue"><xsl:value-of select="." /></xsl:variable>
	 <xsl:if test="$nodeValue!='None'">
	 	<p><span>******    </span>   <h4><xsl:value-of select="name()"/>:</h4> <xsl:apply-templates /></p> 
	 </xsl:if>
</xsl:template>


<xsl:template match="status"></xsl:template>



</xsl:stylesheet>
